package dp.mobile.eden.multiplayer.message.action;

import java.io.Serializable;
import dp.mobile.eden.multiplayer.message.MessageBase;

public class ActionUpdate extends MessageBase implements Serializable {
	/*public enum ActionType {
		BUILD_TOWER,
		BUILD_GENERATOR,
		UPGRADE_TOWER,
		UPGRADE_GENERATOR,
		SELL_TOWER,
		SELL_GENERATOR,
		SPAWN_ENEMY,
		REMOVE_ENEMY,
		TRANSFER_ELECTRICITY
	};*/
	
	public static final int ACTION_BUILD_TOWER = 1;
	public static final int ACTION_BUILD_GENERATOR = 2;
	public static final int ACTION_UPGRADE_TOWER = 3;
	public static final int ACTION_UPGRADE_GENERATOR = 4;
	public static final int ACTION_DISMANTLE_TOWER = 5;
	public static final int ACTION_DISMANTLE_GENERATOR = 6;
	public static final int ACTION_SPAWN_ENEMY = 7;
	public static final int ACTION_REMOVE_ENEMY = 8;
	public static final int ACTION_TRANSFER_ELECTRICITY = 9;
	
	private int mActionType;
	protected int mEntityId;
	protected boolean isOwnerServer;
	
	public ActionUpdate(long gameTime , int type , boolean isServer , int entityId) {
		super(MessageBase.ID_ACTION_UPDATE, gameTime);
		mActionType = type;
		mGameTime = gameTime;
		isOwnerServer = isServer;
		mEntityId = entityId;
	}
	
	@Override
	public String toString() {
		return "ACTION UPDATE on  : " + mGameTime + " with : " + mActionType;
	}
	
	public int getAction() {
		return mActionType;
	}
	
	public int getEntityID() {
		return mEntityId;
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = -6718672821979220849L;

}
